package test.map;

public class LiveData {

    private int count = 2;

    public interface OnChangeListener {

        void onChange(int count);
    }

    private OnChangeListener mOnChangeListener;

    public void check(OnChangeListener listener) {
        mOnChangeListener = listener;
    }

    public void changeCount() {
        count++;
        if (mOnChangeListener != null) {
            mOnChangeListener.onChange(count);
        }
    }
}
